import java.util.ArrayList;
import java.util.LinkedList;

public class Main {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        LinkedList list = new LinkedList(arrayList);
        System.out.println(list);
    }
    public static void main2(String[] args) {
        MyLinkList myLinkList = new MyLinkList();
        myLinkList.addLast(99);
        myLinkList.addLast(88);
        myLinkList.addLast(77);
        myLinkList.addLast(66);
        myLinkList.display();
        System.out.println();
        myLinkList.remove(77);
        myLinkList.display();
        myLinkList.remove(66);
        System.out.println();
        myLinkList.display();
    }
    public static void main1(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.createList();
        System.out.println("=====");
        mySingleList.display();
        System.out.println("====");
        System.out.println(mySingleList.contains(2));
        System.out.println(mySingleList.contains(6));
        System.out.println("====");
        System.out.println(mySingleList.size());
        mySingleList.addFirst(99);
        mySingleList.display();
        System.out.println("====");
        mySingleList.addLast(100);
        mySingleList.display();
        mySingleList.addLast(3);
        mySingleList.display();
        mySingleList.removeAllKey(3);
        mySingleList.display();
    }
}